Skip to content

Add poa_ prefix to returned names when return_components=True in transposition functions - #2627

Merged
kandersolar merged 5 commits into
pvlib:mainfrom
kandersolar:poa_prefix
Jan 15, 2026
Merged

Add poa_ prefix to returned names when return_components=True in transposition functions#2627
kandersolar merged 5 commits into
pvlib:mainfrom
kandersolar:poa_prefix

Conversation

@kandersolar

Copy link
Copy Markdown
Member

Note that pvfactors_timeseries (actually solarfactors under the hood) uses the old names, so the pvfactors tests are going to fail until solarfactors is updated and a new version released.

@ramaroesilva

ramaroesilva commented Dec 21, 2025

Copy link
Copy Markdown
Contributor

@kandersolar nice to see this moving! Will this be done also for isotropic, klucher, reindl, and king? I also noticed that the last two have "poa_" in the docstring but not on the actual variable within the code.

Also, I guess I should address #1553 (which is being handled here #2527) on top of this right? Once you comment on my first question (and it is addressed, if I'm right) I can later review this PR, so that its merging is sped up.

@kandersolar kandersolar changed the title Add poa_ prefix to returned named when return_components=True in transposition functions Add poa_ prefix to returned names when return_components=True in transposition functions Dec 22, 2025
@kandersolar

Copy link
Copy Markdown
Member Author

Will this be done also for isotropic, klucher, reindl, and king?

No, the idea here was to make only the breaking changes (changing returned dict key/dataframe column names), which only affect the functions that already have the return_components parameter. To be clear, these two sets of changes are related, but can be done independently in parallel:

  1. The breaking change of renaming the component column names for haydavies, perez, and perez_driesse (this PR)
  2. The enhancement of adding return_components to the other functions (starting with Adapts irradiance.isotropic to return_components framework. #2527)

Better to keep them separate because smaller, focused PRs are easier to review, and because it means we can be sure to get the breaking changes into the next release (a .0 release) even if the enhancements aren't ready in time.

I also noticed that the last two have "poa_" in the docstring but not on the actual variable within the code.

The names of actual variables in the code are not user-facing, so strictly speaking it doesn't matter if they match the docstring (or anything else). If we want to change them to have poa_ for code clarity then that's fine, but that's orthogonal to achieving #1553.

Also, I guess I should address #1553 (which is being handled here #2527) on top of this right? Once you comment on my first question (and it is addressed, if I'm right) I can later review this PR, so that its merging is sped up.

Hopefully the above addresses this :) These two changes can be worked on independently. I do think this PR achieves the intended scope and is ready for review though.

Comment thread tests/test_irradiance.py Outdated
kandersolar added a commit to kandersolar/solarfactors that referenced this pull request Jan 15, 2026
@kandersolar kandersolar added this to the v0.13.2 milestone Jan 15, 2026
Comment thread docs/sphinx/source/whatsnew/v0.13.2.rst Outdated
@cwhanse cwhanse modified the milestones: v0.13.2, v0.14.0 Jan 15, 2026
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
@cwhanse

cwhanse commented Jan 15, 2026

Copy link
Copy Markdown
Member

I thought the discussion in #2529 indicated that this change would happen in v0.14, since its breaking?

@kandersolar

Copy link
Copy Markdown
Member Author

The imminent release, which was once called v0.13.2, will be v0.14.0 instead. The whatsnew will be renamed in the release PR, and I need to clean up the milestones too.

kandersolar added a commit to pvlib/solarfactors that referenced this pull request Jan 15, 2026
* adapt to changed keys from pvlib perez function

pvlib/pvlib-python#2627

* whatsnew

* retain compatibility with older pvlib

* fix mistake
@kandersolar

Copy link
Copy Markdown
Member Author

CI is green after I retriggered everything following making a new solarfactors release (v1.6.1) with compatibility for this change.

@kandersolar
kandersolar merged commit 9774a26 into pvlib:main Jan 15, 2026
42 of 52 checks passed
@kandersolar
kandersolar deleted the poa_prefix branch January 15, 2026 22:53
kandersolar added a commit to kandersolar/pvlib-python that referenced this pull request Apr 21, 2026
kandersolar added a commit that referenced this pull request Aug 5, 2026
* ants2d and new VF code

* remove some cruft

* add tests for ants2d._shaded_fraction

* refactoring and more tests

* tests for _apply_ground_slope

* tests for _apply_sky_diffuse_model

* fix return shape and tests for vf_row_ground_2d_integ

* fix return shape and tests for vf_row_sky_2d_integ

* major docstring cleanup

* standardize to "back" instead of "rear"

* shape fixes, pandas out

* bugfix in unshaded ground fraction

* add several tests for main function

* test updates

* better return type logic; more get_irradiance tests

* expose max_rows, more get_irradiance tests

* fix issue with horizontal array and large max_rows

* fix unshaded_ground_fraction for horizontal special case

* fix row->ground VF edge case

* switch default model from isotropic to perez

* add hardcoded regression test

* alphabetize module imports

* docstring work

* utils functions: make height and pitch optional

* get infinite_sheds working again

* polishing

* fix output when surface angle is scalar but irrad is array

* simplify numpy import

* add option to return irradiance incident on ground surface

* more tests for ground irradiance

* one more test

* use `assert_allclose`, not `assert np.isclose`

* allow specifying custom row/ground subsets

* lint

* use `poa_` for `return_components=True` after #2627

* misc cleanup

* fix squeeze bug

* deprecate `npoints`, `vectorize`

* fix deprecation version

* lint

* docstring cleanup

* whatsnew entries

* fix broken gallery example

* add `reference` docs entry and user guide description

* add test to cover untested branch

* feedback from review

Co-Authored-By: Cliff Hansen <5393711+cwhanse@users.noreply.github.com>

* Update pvlib/bifacial/utils.py

Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>

* adopt new description for `phi`

* Update pvlib/bifacial/utils.py

Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>

* changes from review

* allow perez_driesse

* add reference to utils functions

* move g0, g1 to end of function signatures

* fix whatsnew merge

* update tests for #1867

* Apply suggestions from code review

Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>

* clarifications from review by @cwhanse

* Update pvlib/bifacial/ants2d.py

Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>

* transfer whatsnew entries to 0.15.3

* fix bad merge

* compute airmass, dni_extra as needed

* clarifying comments

* lint

* apply suggested edit

* Apply suggestions from code review

Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>

* lint

* address comment nit

* Apply suggestions from code review

Co-authored-by: Will Hobbs <45701090+williamhobbs@users.noreply.github.com>

* update tests per review

* add notes on fixed-tilt

* fix bad whatsnew auto-merge

* tweaks to user's guide page

* changes from review

* Update pvlib/bifacial/utils.py

Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>

* Update pvlib/bifacial/utils.py

Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>

* Update pvlib/bifacial/ants2d.py

Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>

* Update pvlib/bifacial/ants2d.py

Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>

* lint

---------

Co-authored-by: Cliff Hansen <5393711+cwhanse@users.noreply.github.com>
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
Co-authored-by: Will Hobbs <45701090+williamhobbs@users.noreply.github.com>
Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "poa_" prefix to return_components=True transposition model outputs

3 participants